export const searchForm1 = [
    {
        type: 'rangePicker',
        key: 'startClassTime',
        label: '开课时间',
        props: {

        }
    },
    {
        type: 'select',
        key: 'department',
        label: '学部',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: 'classPeriod',
        label: '期次',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: 'periodName',
        label: '期名',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: 'clazzStatus',
        label: '行课进度',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
];

export const searchForm2 = [
    {
        type: 'rangePicker',
        key: 'startClassTime',
        label: '开课日期',
        props: {

        }
    },
    {
        type: 'select',
        key: 'department',
        label: '学部',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: 'classPeriod',
        label: '期次',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: 'periodName',
        label: '期名',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    // {
    //     type: 'select',
    //     key: 'clazzStatus',
    //     label: '行课进度',
    //     optionsConfig: {
    //         options: [],
    //         pager: {}
    //     },
    //     props: {
    //         mode: 'multiple'
    //     }
    // },
];

const SEARCH_PART = {
    FOUR: 4,
    FIVE: 5,
};

export const SEARCH_FORM_CONFIG = {
    [SEARCH_PART.FOUR]: searchForm1,
    [SEARCH_PART.FIVE]: searchForm2
};

export const PART_TWO_TITLE = {
    [SEARCH_PART.FOUR]: 'I. 刷单渠道',
    [SEARCH_PART.FIVE]: 'II. 流量质量'
};

// 页面id
export const pageId = {
    0: {
        id: '',
        title: '流量风控',
        selectID: 'selectUnit_10'
    },
};

// 纬度id由页面id 和 纬度key拼接成, 小驼峰
export const getDimensionId = (index, searchKey) => {
    if (searchKey && pageId[index].id) {
        const newSearchKey = searchKey.slice(0, 1).toUpperCase() + searchKey.slice(1);

        return pageId[index].id + newSearchKey;
    }

    return '';
};

export const META = {
    [SEARCH_PART.FOUR]: {
        PART_TWO_CARD_ONE: 'RiskControlFourPart_partOne_card_1',
        PART_TWO_COMPOSITE_ONE: 'RiskControlFourPart_partOne_composite_1',
        PART_TWO_TEXT_ONE: 'RiskControlFourPart_partOne_text_1',
        PART_TWO_EXCEL_ONE: 'RiskControlFourPart_partOne_excel_1',
    },
    [SEARCH_PART.FIVE]: {
        PART_TWO_CARD_ONE: 'RiskControlFivePart_partOne_card_1',
        PART_TWO_COMPOSITE_ONE: 'RiskControlFivePart_partTwo_composite_1',
        PART_TWO_TEXT_ONE: 'RiskControlFivePart_partOne_text_1',
        PART_TWO_EXCEL_ONE: 'RiskControlFivePart_partTwo_excel_1',
    }
};

